package com.mobile.collect.net;


import com.mobile.collect.beans.TokenInfo;
import com.mobile.collect.beans.UploadFileResponse;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.POST;


public interface ApiService {

    @FormUrlEncoded
    @POST("/api/user/login")
    Observable<BaseObjBean<TokenInfo>> login(@Field("username") String id_number, @Field("password") String password);

    @POST("/api/upload")
    Observable<BaseObjBean<UploadFileResponse>> uploadFileWithRequestBody(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("/api/task/create")
    Observable<BaseObjBean<UploadFileResponse>> create(@Header("token") String token2,@Field("token") String token,@Field("task_name") String task_name,@Field("task_number") String task_number, @FieldMap Map<String,String> fieldMap);


}



